#pragma once
#include "Comm.hpp"//看到同一份资源

class Client
{
public:
    //初始化
    Client():_fd(gdefulted){}
    //打开管道
    bool OpenpipeForWrite()
    {
        _fd = OpenPipe(gForWrite);
        if(_fd < 0) return false;
        return true;
    }
    //发送管道
    int SendPipe(const string& in)
    {
        return write(_fd,in.c_str(),sizeof(in));
    }
    //关闭管道
    void ClosePipe()
    {
        ClosePipeHelper(_fd);
    }
    ~Client(){}
private:
    int _fd;
};